package LibraryManagementSystem.user;

import LibraryManagementSystem.IOperation;
import LibraryManagementSystem.book.Bookcase;

import java.util.Scanner;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2022/10/19 22:09
 * 用户抽象类
 */
public abstract class User {
    protected Scanner scanner = new Scanner(System.in);

    //姓名
    protected String name;
    protected IOperation[] operations;
    //根据用户输入执行相应操作
    public abstract int menu();

    public void doOperation(int choice, Bookcase bookcase){
        operations[choice-1].work(bookcase);
    }


}
